function Gadget(name) {
    this.name = name;
}

Gadget.prototype.name = "mirror";
var toy = new Gadget('camera');
console.log('toy.name :' + toy.name);
console.log("toy.hasOwnProperty('name'):");
console.log(toy.hasOwnProperty('name'));
console.log('Del toy.name')
delete toy.name;
console.log('toy.name :' + toy.name);
console.log("toy.hasOwnProperty('name'):");
console.log(toy.hasOwnProperty('name'));
console.log("Object.prototype.hasOwnProperty('toString')");
console.log(Object.prototype.hasOwnProperty('toString'));
/*
Gadget.prototype.price = 100;
Gadget.prototype.rating = 3;
Gadget.prototype.getInfo = function () {
    return 'Rating :' + Gadget.prototype.rating + ', price :' + Gadget.prototype.price;
};
var newtoy = new Gadget('webcam', 'black ');
console.log('newtoy.name  :' + newtoy.name);
console.log('newtoy.color :' + newtoy.color);
console.log('newtoy.WhatAreYou :' + newtoy.WhatAreYou());
console.log('newtoy.price :' + newtoy.price);
console.log('newtpy.getInfo:' + newtoy.getInfo());
console.log("newtoy.constructor === Gadget :");
console.log(newtoy.constructor === Gadget);
console.log('newtoy.constructor.prototype.rating :' + newtoy.constructor.prototype.rating);
*/